package deconstruction.additionalModSupport;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import ic2.api.item.Items;
import deconstruction.deconTable.DeconstructionManager;

public class ic2{
	public static void LoadRecipes(DeconstructionManager recipes){
		
		
		
		
		
		/*
		  addRecipeExtruding("ingotTin", 1, StackUtil.copyWithSize(Ic2Items.tinCableItem, 3));
		    addRecipeExtruding("ingotCopper", 1, StackUtil.copyWithSize(Ic2Items.copperCableItem, 3));
		    addRecipeExtruding(new ItemStack(Item.ingotGold), 1, StackUtil.copyWithSize(Ic2Items.goldCableItem, 4));
		    addRecipeExtruding(new ItemStack(Item.ingotIron), 1, StackUtil.copyWithSize(Ic2Items.ironCableItem, 4));
		    addRecipeExtruding("plateIron", 1, Ic2Items.fuelRod);
		    addRecipeExtruding("plateTin", 1, StackUtil.copyWithSize(Ic2Items.cell, 3));
		    addRecipeExtruding(Ic2Items.casingiron, 1, StackUtil.copyWithSize(Ic2Items.ironFence, 1));
		    addRecipeExtruding(Ic2Items.casingtin, 1, Ic2Items.tinCan);

		    addRecipeRolling(new ItemStack(Item.ingotIron), 1, Ic2Items.plateiron);
		    addRecipeRolling(new ItemStack(Item.ingotGold), 1, Ic2Items.plategold);
		    addRecipeRolling("ingotCopper", 1, Ic2Items.platecopper);
		    addRecipeRolling("ingotRefinedIron", 1, Ic2Items.plateadviron);
		    addRecipeRolling("ingotBronze", 1, Ic2Items.platebronze);
		    addRecipeRolling("ingotLead", 1, Ic2Items.platelead);
		    addRecipeRolling("ingotTin", 1, Ic2Items.platetin);

		    addRecipeRolling("plateIron", 1, StackUtil.copyWithSize(Ic2Items.casingiron, 2));
		    addRecipeRolling("plateGold", 1, StackUtil.copyWithSize(Ic2Items.casinggold, 2));
		    addRecipeRolling("plateRefinedIron", 1, StackUtil.copyWithSize(Ic2Items.casingadviron, 2));
		    addRecipeRolling("plateBronze", 1, StackUtil.copyWithSize(Ic2Items.casingbronze, 2));
		    addRecipeRolling("plateTin", 1, StackUtil.copyWithSize(Ic2Items.casingtin, 2));
		    addRecipeRolling("plateCopper", 1, StackUtil.copyWithSize(Ic2Items.casingcopper, 2));
		    addRecipeRolling("plateLead", 1, StackUtil.copyWithSize(Ic2Items.casinglead, 2));

		    addRecipeCutting("plateTin", 1, StackUtil.copyWithSize(Ic2Items.tinCableItem, 3));
		    addRecipeCutting("plateCopper", 1, StackUtil.copyWithSize(Ic2Items.copperCableItem, 3));
		    addRecipeCutting("plateGold", 1, StackUtil.copyWithSize(Ic2Items.goldCableItem, 4));
		    addRecipeCutting("plateIron", 1, StackUtil.copyWithSize(Ic2Items.ironCableItem, 4));
		    */
		
		
		
		/*
	    addRecipe("a",new ItemStack(Block.oreIron), 1, Items.getItem("crushedIronOre"), 2);
	    addRecipe("a",new ItemStack(Block.oreGold), 1, Items.getItem("crushedGoldOre"), 2);
	    addRecipe("a",new ItemStack(Item.coal), 1, Items.getItem("coalDust"));
	    addRecipe("a",new ItemStack(Item.ingotIron), 1, Items.getItem("ironDust"));
	    addRecipe("a",new ItemStack(Item.ingotGold), 1, Items.getItem("goldDust"));
	    addRecipe("a",new ItemStack(Item.dyePowder, 1, 4), 1, Items.getItem("lapiDust"), 1);
	    addRecipe("a",new ItemStack(Block.cloth), 1, new ItemStack(Item.silk, 2));
	    addRecipe("a",new ItemStack(Block.gravel), 1, new ItemStack(Item.flint));
	    addRecipe("a",new ItemStack(Block.stone), 1, new ItemStack(Block.cobblestone));
	    addRecipe("a",new ItemStack(Block.cobblestone), 1, new ItemStack(Block.sand));
	    addRecipe("a",new ItemStack(Block.sandStone), 1, new ItemStack(Block.sand));
	    addRecipe("a",new ItemStack(Block.ice), 1, new ItemStack(Item.snowball));
	    addRecipe("a",new ItemStack(Block.blockClay), 1, Items.getItem("clayDust"), 2);
	    addRecipe("a",new ItemStack(Block.glowStone), 1, new ItemStack(Item.glowstone, 4));
	    addRecipe("a",new ItemStack(Item.bone), 1, new ItemStack(Item.dyePowder, 5, 15));
	    addRecipe("a",Items.getItem("plantBall"), 1, new ItemStack(Block.dirt, 8));
	    addRecipe("a",Items.getItem("coffeeBeans"), 1, Items.getItem("coffeePowder"), 3);
	    addRecipe("a",new ItemStack(Item.blazeRod), 1, new ItemStack(Item.blazePowder, 5));
	    addRecipe("a",new ItemStack(Item.spiderEye), 1, Items.getItem("grinPowder"), 2);
	    addRecipe("a",new ItemStack(Item.poisonousPotato), 1, Items.getItem("grinPowder"));
	    addRecipe("a",new ItemStack(Block.obsidian), 1, Items.getItem("obsidianDust"), 4);
	    addRecipe("a",new ItemStack(Block.coalBlock), 1, Items.getItem("coalDust"), 9);
	    addRecipe("a",new ItemStack(Block.blockLapis), 1, Items.getItem("lapiDust"), 9);
	    addRecipe("a",new ItemStack(Block.blockRedstone), 1, new ItemStack(Item.redstone, 9));

	    addRecipe("ingotCopper", 1, Items.getItem("copperDust);
	    addRecipe("ingotRefinedIron", 1, Items.getItem("ironDust);
	    addRecipe("ingotBronze", 1, Items.getItem("bronzeDust);
	    addRecipe("ingotSilver", 1, Items.getItem("silverDust);
	    addRecipe("ingotLead", 1, Items.getItem("leadDust);
	    addRecipe("ingotTin", 1, Items.getItem("tinDust);
	    addRecipe("plateIron", 1, Items.getItem("ironDust);
	    addRecipe("plateGold", 1, Items.getItem("goldDust);
	    addRecipe("plateRefinedIron", 1, Items.getItem("ironDust);
	    addRecipe("plateLead", 1, Items.getItem("leadDust);
	    addRecipe("plateBronze", 1, Items.getItem("bronzeDust);
	    addRecipe("plateTin", 1, Items.getItem("tinDust);
	    addRecipe("plateCopper", 1, Items.getItem("copperDust);
	    addRecipe("plateLapis", 1, Items.getItem("lapiDust);
	    addRecipe("plateObsidian", 1, Items.getItem("obsidianDust);
	    addRecipe("oreCopper", 1, Items.getItem("crushedCopperOre, 2));
	    addRecipe("oreLead", 1, Items.getItem("crushedLeadOre, 2));
	    addRecipe("oreSilver", 1, Items.getItem("crushedSilverOre, 2));
	    addRecipe("oreTin", 1, Items.getItem("crushedTinOre, 2));
	    addRecipe("oreUranium", 1, Items.getItem("crushedUraniumOre, 2));
		
		*/
		
		
		
		
		
		
		
	    addRecipe(Items.getItem("resin"), 1,Items.getItem("rubber"), 3);
	    addRecipe(Items.getItem("bioCell"), 1, Items.getItem("biofuelCell"));
	    addRecipe(Items.getItem("hydratedCoalCell"), 1, Items.getItem("coalfuelCell"));
	    addRecipe(Items.getItem("waterCell"), 1, Items.getItem("hydratingCell"));
	    //addRecipe("woodRubber", 1, Items.getItem("rubber);
	    
	    
	    
		
		recipes.addShapelessRecipe(Items.getItem("compressedPlantBall"), Items.getItem("plantBall"));
	    recipes.addShapelessRecipe(Items.getItem("hydratedCoalClump"), Items.getItem("hydratedCoalDust"));
	    recipes.addShapelessRecipe(new ItemStack(Block.netherBrick), new ItemStack(Block.netherrack, 3));
	    recipes.addShapelessRecipe(new ItemStack(Block.ice), new ItemStack(Item.snowball, 1));
	    recipes.addShapelessRecipe(Items.getItem("advancedAlloy"),Items.getItem("mixedMetalIngot"));
	    recipes.addShapelessRecipe( Items.getItem("carbonPlate"), Items.getItem("carbonMesh"));
	    recipes.addShapelessRecipe(Items.getItem("compressedCoalBall"),Items.getItem("coalBall"));
	    recipes.addShapelessRecipe(new ItemStack(Item.diamond), Items.getItem("coalChunk"));
	    recipes.addShapelessRecipe(Items.getItem("airCell"), Items.getItem("cell"));

	    //TODO: add dense plate recipes
	    /*
	    recipes.addShapelessRecipe("dustLapis", 1, Items.getItem("platelapi"));
	    recipes.addShapelessRecipe("dustObsidian", 1, Items.getItem("plateobsidian"));
	    recipes.addShapelessRecipe("plateIron", 9, Items.getItem("denseplateiron"));
	    recipes.addShapelessRecipe("plateGold", 9, Items.getItem("denseplategold"));
	    recipes.addShapelessRecipe("plateRefinedIron", 9, Items.getItem("denseplateadviron"));
	    recipes.addShapelessRecipe("plateLead", 9, Items.getItem("denseplatelead"));
	    recipes.addShapelessRecipe("plateBronze", 9, Items.getItem("denseplatebronze"));
	    recipes.addShapelessRecipe("plateTin", 9, Items.getItem("denseplatetin"));
	    recipes.addShapelessRecipe("plateCopper", 9, Items.getItem("denseplatecopper"));
	    recipes.addShapelessRecipe("plateLapis", 9, Items.getItem("denseplatelapi"));
	    recipes.addShapelessRecipe("plateObsidian", 9, Items.getItem("denseplateobsidian"));
	    */
	}
	
	public static void addRecipe(ItemStack Out, int i, ItemStack In, int j){
		DeconstructionManager.getInstance().addShapelessRecipe(new ItemStack(In.itemID, In.getItemDamage(), i), new ItemStack(Out.itemID, Out.getItemDamage(), j));
	}
	public static void addRecipe(ItemStack Out, int i, ItemStack In){
		addRecipe(Out, i, In, 1);
	}
	public static void addRecipe(String s, ItemStack Out, int i, ItemStack In, int j){
		addRecipe(In, j, Out, i);
	}
	
	
}